<?php $this->load->view("common/page_header");?>
	<?php $this->load->view("common/top_banner");?>		
	<?php $this->load->view("common/header");?>
	<div id="body_main">		
		<?php $this->load->view("common/navigator");?>
		<?php $this->load->view("common/top_login_button");?>
		<div class="top_border">
			<div class="arrow_up" style="left:90px"></div>
		</div>
		
		<div id="body_content">
			<?php $this->load->view("common/categories");?>
				
			<div class="sub_categories">
				<?php if(!empty($categories[1])) {?>
				<ul>
					<?php for ($k = 0, $n = count($categories[1]); $k < $n; $k++) { ?>
					<li class="category_items">
						<div class="parent"><?php echo $categories[1][$k]['name'] ?>	</div>
						<?php if(!empty($categories[1])) {?>
							<ul class="children">
								<?php for ($i = 0, $m = count($categories[2]); $i < $m; $i++) { ?>
									<?php if($categories[2][$i]['parent_id'] == $categories[1][$k]['id']) {?>
										<li><a href="<?php echo site_url("/expert/lists/" . $categories[2][$i]['id'])?>"><?php echo $categories[2][$i]['name'] ?></a><span class="gray">（<?php echo $categories[2][$i]['expert_count'] ?>）</span></li>
									<?php } ?>
								<?php } ?>
							</ul>
						<?php }?>
						<div class="clear"></div>
					</li>
					<?php } ?>
				</ul>
				<?php }?>
			</div>
			<div class="clear"></div>
		</div>
		
		<?php $this->load->view("common/footer");?>		
		
		<p class="center">Page rendered in {elapsed_time} seconds</p>
	</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#register_button").colorbox({iframe:true,href:"/user/register_ajax", innerWidth:600, innerHeight:600, close:'关闭'});
	$("#login_button").colorbox({iframe:true,href:"/user/login_ajax",innerWidth:480, innerHeight:300, close:'关闭'});
});	
</script>
<?php $this->load->view("common/page_footer");?>
